import request from '@/utils/request'
const groupName = 'sysUser'
export function login(data) {
  return request({
    url: `/${groupName}/doLogin`,
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: `/${groupName}/info`,
    method: 'get',
  })
}

export function logout() {
  return request({
    url: `/${groupName}/logout`,
    method: 'post'
  })
}

export function update(data) {
  return request({
    url: `/${groupName}/update`,
    method: 'put',
    data
  })
}

export function updatePwd(data) {
  return request({
    url: `/${groupName}/updatePwd`,
    method: 'put',
    data
  })
}

export function getSysUser() {
  return request({
    url: `/${groupName}/getSysUser`,
    method: 'get',
  })
}